#pragma once
#include "Entity.h"
#include "RenderState.h"
#include "Model.h"

class CRenderEntity : public CEntity
{
	struct _RenderChunk
	{
		CModel*		mModels;
		CMaterial	mMaterial;
		RenderState	mRenderState;
	};
public:
	CRenderEntity();
	virtual ~CRenderEntity();
	virtual void SetPosition(D3DXVECTOR3 Positon);
	virtual void SetRotate(D3DXVECTOR3 Rotate);
	virtual void SetScale(D3DXVECTOR3 Scale);
	void AddModel(const String& name, CModel* pModel, CMaterial* pMaterial, RenderState* pRenderState);
	void RemoveModel(const String&name);
	
private:
	std::map<String, _RenderChunk>	mRenderChunkMap;
	D3DXVECTOR3	mPosition;
	D3DXVECTOR3 mRotate;
	D3DXVECTOR3 mScale;
	D3DXMATRIX	mMatrix;
	DEFINE( CRenderEntity )
};